home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 122_01 / vocab < prev    next >
Text File  |  1984-03-05  |  5KB  |  164 lines

  1. VOCABULARY RELATED WORDS:
  2. copyright (C) 1983 by E. E. Bergmann
  3. definitions in alphabetical(ASCII) order
  4. :
  5. ::
  6. *********************************************************
  7. *                            *
  8. * PISTOL-Portably Implemented Stack Oriented Language    *
  9. *            Version 2.0            *
  10. * (C) 1983 by    Ernest E. Bergmann            *
  11. *        Physics, Building #16            *
  12. *        Lehigh Univerisity            *
  13. *        Bethlehem, Pa. 18015            *
  14. *                            *
  15. * Permission is hereby granted for all reproduction and *
  16. * distribution of this material provided this notice is *
  17. * included.                        *
  18. *                            *
  19. *********************************************************
  20. :
  21. ::
  22. (PISTOL<)    Variable that contains pointer to most recent
  23.         definition in the PISTOL< vocabulary branch;
  24.         see PISTOL<, below.
  25.  
  26. (UNLINKED<)    Variable that contains pointer to most recent
  27.         definition in the UNLINKED< vocabulary branch;
  28.         see UNLINKED<, below.
  29.  
  30. .V        --> (pointer to top of vocabulary stack)
  31.         It is the vocabulary stack pointer.
  32.  
  33. >        Pops (removes from) the top of the Vocabulary
  34.         Stack, which contains a list of Vocabulary
  35.         Branches to be searched by the interpreter or
  36.         by the FIND command.
  37.  
  38. ADDRESS        '<name> --> (its address)
  39.         If the word is not found, an error diagnostic
  40.         is provided.
  41.  
  42. BLIST        Utility that types out a list of all Vocabulary
  43.         Branches that exist ("Branch List").
  44.  
  45. BRANCH        Creates a new "catagory" or "heading" for
  46.         definitions; creates a new vocabulary whose
  47.         name is what has been placed on the stack.
  48.         For example:
  49.         X> 'SPECIAL< BRANCH
  50.         X> SPECIAL<  DEFINITIONS
  51.         X> 'FIRST : ....    ;
  52.         .
  53.         .
  54.         X> > DEFINITIONS  % finish definitions for
  55.         X>          % SPECIAL< vocabulary
  56.  
  57. CURRENT        Variable containing pointer to Vocabulary
  58.         Branch into which the next word definition
  59.         will be placed.  Normally, this pointer points
  60.         at the last definition.
  61.  
  62. DEFINITIONS    Changes the CURRENT pointer to match the latest
  63.         Vocabulary Branch on the Vocabulary Stack.
  64.         Thus, further word definitions will be placed
  65.         in the Branch that is currently on the top of
  66.         the Vocabulary stack (see the example given
  67.         above for BRANCH).
  68.  
  69. FENCE        Variable containing lower limit for FORGET, see
  70.         below.
  71.  
  72. FIND        '<name> --> (its address) if found
  73.             --> FALSE    if not found
  74.  
  75. FORGET        '<name> -->
  76.         Removes all definitions recently defined back
  77.         back to and including the defintion of <name>.
  78.         Will ABORT if the address of <name> is below
  79.         (before) the value of FENCE, see above.
  80.  
  81. NAME        TOS -->
  82.         Takes the TOS as an address of a definition or
  83.         a "primitive" ( an "opcode" that can be
  84.         interpreted, even so it is not an address)
  85.         and prints its name.  NAME is used by the
  86.         disassembler, by TRACE, and by the definition
  87.         listers, such as NEXT10, below.
  88.  
  89. NEXT10        TOS --> ADDR
  90.         Takes the TOS as the address of a definition;
  91.         That definition and the preceding 9 definitions
  92.         in the same vocabulary are listed by address
  93.         and NAME.  Upon completion, the address of the
  94.         next logically listable definition, ADDR, is
  95.         left on stack.  So, for example, to list the
  96.         last thirty definitions one could type:
  97.         X> TOP10 NEXT10 NEXT10 DROP
  98.  
  99. PISTOL<        Accesses the original vocabulary branch of
  100.         PISTOL.  Invoking this word will place
  101.         (PISTOL<) on the top of the vocabulary stack
  102.         so that this branch will be first in the
  103.         search path.
  104.  
  105. PREVIOUS    Variable that contains the address of the
  106.         previous link to the definition last found
  107.         by FIND or VFIND.  It is used by UNLINK and
  108.         RELINK to obtain the link to the item searched
  109.         for.
  110.  
  111. PRIMITIVE?    TOS --> TRUE|FALSE
  112.         Decides whether the TOS is a suitable value to
  113.         be an "opcode" to be executed directly by the
  114.         PISTOL "primitive" interpreter, PINT, as
  115.         opposed to the address of a higher level
  116.         definition.  It is used by NAME to decide
  117.         that TOS is not the address of a definition
  118.         entry.
  119.  
  120. RELINK        '<name> -->
  121.         Searches the UNLINKED< Vocabulary Branch for
  122.         the <name> definition;  if found, it is removed
  123.         from that Branch and (re)attached to the
  124.         Vocabulary Branch that is at the top of the
  125.         Vocabulary Stack.
  126.  
  127. TOP10        --> ADDR
  128.         Lists the ten most recent definitions in the
  129.         CURRENT vocabulary branch.  It leaves the
  130.         address of the next definition to be listed
  131.         on the stack to be available for NEXT10; see
  132.         the example of use above for NEXT10.
  133.  
  134. UNLINK        '<name> -->
  135.         Searches for the <name> definition; if found,
  136.         it is removed from its vocabulary branch and
  137.         attached to the UNLINKED< vocabulary branch.
  138.         It is used to removed from the usual search
  139.         path those definitions which are no longer of
  140.         use or which are too dangerous to be easily
  141.         accessible.
  142.  
  143. UNLINKED<    Vocabulary branch into which all UNLINKed
  144.         definitions are placed (see UNLINK, RELINK).
  145.         Invoking UNLINKED< will place (UNLINKED<)
  146.         at the top of the vocabulary stack.
  147.  
  148. VADDRESS    '<name> VOCAB --> (address)
  149.         Similar to ADDRESS, but only the specified
  150.         vocabulary branch is searched.
  151.  
  152. VFIND        '<name> VOCAB --> (address)|FALSE
  153.         Similar to FIND, except that only the specified
  154.         vocabulary branch is searched.
  155.  
  156. VLIST        --> ADDR
  157.         Lists the ten most recent definitions in the
  158.         topmost branch on vocabulary stack.  It leaves
  159.         the address of the next definition to be listed
  160.         on the stack to be available for NEXT10;
  161.         similar to TOP10 (see above).
  162.  
  163. :
  164. r NEXT10